//
//  CollectionViewCellFactory.m
//  iOSProjectA
//
//  Created by jiasong on 16/4/20.
//  Copyright © 2016年 jiasong. All rights reserved.
//

#import "CollectionViewCellFactory.h"

@implementation CollectionViewCellFactory
+(BaseCollectionViewCell *)cellWithModelClass:(Class)modelClass collectionView:(UICollectionView *)collection index:(NSIndexPath *)indexPath {
    // 将Model的类名来作为cell的标识符
    NSString *identifier = NSStringFromClass(modelClass);
    // 从重用集合中找到cell
    BaseCollectionViewCell *cell = [collection dequeueReusableCellWithReuseIdentifier:identifier forIndexPath:indexPath];
    return cell;
}
@end
